home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / tdk_v120.zip / CHECKPAT.PAS < prev    next >
Pascal/Delphi Source File  |  1996-07-15  |  2KB  |  83 lines

  1. {
  2.  ▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀    ▀▀   ▀▀
  3.    ▀▀     ▀▀   ▀▀   ▀▀  ▀▀
  4.   ▀▀     ▀▀   ▀▀▀  ▀▀▀▀▀  The DoorKit!
  5.  ▀▀     ▀▀   ▀▀   ▀▀  ▀▀
  6. ▀▀     ▀▀▀▀▀▀    ▀▀    ▀▀
  7. The BBS Door Development Kit By The People - For The People!
  8.  
  9.  
  10.    Feel free to modify or optimize this code at will. All I ask is that if
  11.    find a better way to do things (and you will), please send me a copy of
  12.    your modifications. Thanks in advance!....Larry L. Athey....}
  13.  
  14. Unit checkpat;
  15. {
  16.    --- Version 3.3 91-11-21 16:12 ---
  17.  
  18.    CHECKPAT.PAS: Wrapper unit for path check function.
  19.  
  20.    Needs Assembler file 'checkpat.asm' (assembled as 'checkpap.obj').
  21.  
  22. Public domain software by
  23.  
  24.         Thomas Wagner
  25.         Ferrari electronic GmbH
  26.         Beusselstrasse 27
  27.         D-1000 Berlin 21
  28.         Germany
  29.  
  30.         BIXname: twagner
  31. }
  32.  
  33. INTERFACE
  34.  
  35. CONST
  36.  
  37. INF_NODIR       =  1;  { Don't interpret name as directory }
  38.  
  39. {e Error Return codes }
  40. {d Fehlercodes }
  41.  
  42. ERR_DRIVE       = - 1;  { Invalid drive }
  43. ERR_PATH        = - 2;  { Invalid path }
  44. ERR_FNAME       = - 3;  { Malformed filename }
  45. ERR_DRIVECHAR   = - 4;  { Illegal drive letter }
  46. ERR_PATHLEN     = - 5;  { Path too long }
  47. ERR_CRITICAL    = - 6;  { Critical error (invalid drive) }
  48.  
  49. {e Good returns (values ORed): }
  50. {d Rückgabewerte wenn kein Fehler auftrat: }
  51.  
  52. HAS_WILD     =     1;  { Filename/ext has wildcard characters }
  53. HAS_EXT      =     2;  { Extension specified }
  54. HAS_FNAME    =     4;  { Filename specified }
  55. HAS_PATH     =     8;  { Path specified }
  56. HAS_DRIVE    =   $10;  { Drive specified }
  57. FILE_EXISTS  =   $20;  { File exists, upper byte has attributes }
  58. IS_DIR       = $1000;  { Directory, upper byte has attributes }
  59.  
  60.  
  61. { The file attributes returned if FILE_EXISTS or IS_DIR is set }
  62.  
  63. IS_READ_ONLY = $0100;
  64. IS_HIDDEN    = $0200;
  65. IS_SYSTEM    = $0400;
  66. IS_ARCHIVED  = $2000;
  67. IS_DEVICE    = $4000;
  68.  
  69.  
  70. FUNCTION checkpath (VAR name; inflags : INTEGER; VAR drive; VAR dir; 
  71.                     VAR fname; VAR ext; VAR fullpath) : INTEGER;
  72.  
  73. FUNCTION exists (VAR fname) : BOOLEAN;
  74.  
  75. IMPLEMENTATION
  76.  
  77. {$L checkpap}
  78. FUNCTION checkpath (VAR name; inflags : INTEGER; VAR drive; VAR dir; 
  79.                     VAR fname; VAR ext; VAR fullpath) : INTEGER; EXTERNAL;
  80. FUNCTION exists (VAR fname) : BOOLEAN; EXTERNAL;
  81.  
  82. END.
  83.